/*
 * @Author: 1243sd 782012816@qq.com
 * @Date: 2024-03-13 20:48:19
 * @LastEditors: 1243sd 782012816@qq.com
 * @LastEditTime: 2024-06-15 11:42:17
 * @FilePath: \frontend-ykt-admin\src\api\requestApi\user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import _axios from "../axios";

const user = {
	// 后台用户 - 新增后台用户
	user_add(data) {
	  return _axios({
	    method: "post",
	    url: `/api/manager_user`,
		data
	  });
	},
	// // 后台用户 - 后台用户详情
	// user_detail(id) {
	//   return _axios({
	//     method: "get",
	//     url: `/api/manager_user/${id}`,
	//   });
	// },
	// 后台用户 - 编辑
	user_edit(id, data) {
	  return _axios({
	    method: "put",
	    url: `/api/manager_user/${id}`,
		data
	  });
	},
	// 后台用户 - 启用用户
	user_enable(id) {
	  return _axios({
	    method: "put",
	    url: `/api/manager_user/${id}/enable`,
	  });
	},
	// 后台用户 - 停用用户
	user_disable(id) {
	  return _axios({
	    method: "put",
	    url: `/api/manager_user/${id}/disable`,
	  });
	},
	// 后台用户 - 修改用户密码
	user_pass_change(id, data) {
	  return _axios({
	    method: "put",
	    url: `/api/manager_user/${id}/pass_change`,
		data
	  });
	},
	
}

export default user
